//! \file sharedmemory.hpp
//! \brief Purewell Library Shared Memory Header
//! \author Yubin Lim (purewell@gmail.com)
//! \since 2008-01-25

#ifndef __PWHDR_SHAREDMEMORY_HPP__
#define __PWHDR_SHAREDMEMORY_HPP__

#include "file.hpp"

//! \brief Shared memory file. (POSIX.1-2001)
namespace purewell
{

//! \brief Shared memory.
class PWSharedMemory : public PWNamedFile
{
public:
	//! \brief Initialize shared memory.
	//! \param[in] path Name.
	//! \param[in] omode Open mode.
	//! \param[in] perm Permission.
	virtual bool initialize(const char* path, int omode, int perm = 0777);

	//! \brief Unlink shared memory.
	virtual bool unlink(void);

public:
	explicit PWSharedMemory();
	virtual ~PWSharedMemory();
};

};//namespace purewell

#endif//!__PWHDR_SHAREDMEMORY_HPP__

